<%@ Page Language="VB" AutoEventWireup="false" CodeFile="UserManagement.aspx.vb" Inherits="Admin_UserManagement" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Untitled Page</title>
    <style type="text/css" media="screen">
			@import url(../style/style_iframe.css);
	</style>
</head>
<body>
  <div id="pagina_iframe">	
      <h1 class="titolo_iframe" style="position: static; ">ASM - Gestione query aziendali - Gestione Utenti - Dati utente</h1>
  </div>
  <form id="form1" runat="server">
    <div id="main">
        <table style="width: 100%">
            <tr>
                <td align="center" style="width: 30%; height: 29px">
        <asp:Button ID="BTN_salva_dati" runat="server" Text="Salva dati" />
        <asp:LinkButton ID="LNK_elenco_utenti" runat="server" CssClass="Etichetta_pathway">Elenco Utenti</asp:LinkButton></td>
            </tr>
            <tr>
                <td colspan="2" style="height: 17px">
                    <asp:Label ID="LBL_LineaErrori" runat="server" CssClass="Etichetta_Errori"></asp:Label></td>
            </tr>
        </table>
        <table style="width: 840px">
            <tr>
                <td style="width: 137px" class="Etichetta">
                    Cognome</td>
                <td style="width: 185px">
                    <asp:TextBox ID="TXB_cognome" runat="server" Width="200px"></asp:TextBox></td>
                <td style="width: 175px" class="Etichetta">
                    Nome</td>
                <td style="width: 158px">
                    <asp:TextBox ID="TXB_nome" runat="server" Width="200px"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="width: 137px; height: 10px;" class="Etichetta">
                    Email</td>
                <td style="width: 185px; height: 10px;">
                    <asp:TextBox ID="TXB_email" runat="server" Width="200px"></asp:TextBox></td>
                <td style="width: 175px; height: 10px;" class="Etichetta">
                    Abilitato</td>
                <td style="width: 158px; height: 10px;" class="Etichetta">
                    <asp:RadioButton ID="RDB_si" runat="server" Text="Si" GroupName="Stato" />
                    <asp:RadioButton ID="RDB_no" runat="server" Text="No" GroupName="Stato" /></td>
            </tr>
            <tr>
                <td style="width: 137px">
                </td>
                <td style="width: 185px">
                </td>
                <td style="width: 175px">
                </td>
                <td style="width: 158px">
                </td>
            </tr>
            <tr>
                <td style="width: 137px; height: 26px;" class="Etichetta">
                    User Id</td>
                <td style="width: 185px; height: 26px;">
                    <asp:TextBox ID="TXB_userid" runat="server" Width="200px"></asp:TextBox></td>
                <td style="width: 175px; height: 26px;" class="Etichetta">
                    Ruolo</td>
                <td style="width: 158px; height: 26px;">
                    <asp:DropDownList ID="DDL_ruolo" runat="server" Width="200px">
                        <asp:ListItem Value="0">--- Seleziona un ruolo ---</asp:ListItem>
                        <asp:ListItem Value="1">Amministratore</asp:ListItem>
                        <asp:ListItem Value="2">Utente</asp:ListItem>
                    </asp:DropDownList></td>
            </tr>
        </table>
        <asp:Panel ID="PNL_query" runat="server" Height="50px" Width="100%" HorizontalAlign="Center">
        <h1 class="titolo_intermedio" style="position: static; ">Elenco query abilitate per l'utente</h1><asp:Button ID="BTN_abilita_query" runat="server" Text="Abilita query" />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            <asp:Button ID="BTN_disabilita_query" runat="server" Text="Disabilita query" />
            <asp:GridView ID="GridView1" runat="server" BackColor="LightGoldenrodYellow" BorderColor="Tan"
        BorderWidth="1px" CellPadding="2" Font-Names="Arial" ForeColor="Black" GridLines="None" AutoGenerateColumns="False" Font-Size="Small" Width="50%" DataKeyNames="UXQ_codice">
        <FooterStyle BackColor="Tan" />
        <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
        <HeaderStyle BackColor="Tan" Font-Bold="True" />
        <AlternatingRowStyle BackColor="PaleGoldenrod" />
        <Columns>
                <asp:TemplateField>
                      <ItemTemplate>
                          <asp:CheckBox runat="server" ID="CHB_select" />
                      </ItemTemplate>
                      <ItemStyle Width="5%" />
                   </asp:TemplateField>
                   <asp:TemplateField HeaderText="Query abilitata">
                      <ItemTemplate>
                         <asp:label runat="server" ID="LBL_descr_query" text='<%# GetQueryName(Eval("UXQ_cod_qry")) %>' />
                      </ItemTemplate>
                      <EditItemTemplate>
                         <asp:DropDownList runat="server" ID="DDL_query_abil" DataSource="<%# GetQueryTable() %>" DataValueField="QRY_codice" DataTextField="QRY_nome" width="100%" />
                      </EditItemTemplate>
                       <ItemStyle Width="85%" />
                  </asp:TemplateField>
                  <asp:TemplateField>
                      <ItemTemplate> 
                      </ItemTemplate>
                      <EditItemTemplate>
                         <asp:Button id="grv_update" runat="server" Text="S" CommandName="update" ></asp:Button>
					     <asp:Button id="grv_cancel" runat="server" Text="A" CommandName="cancel" ></asp:Button>
                       </EditItemTemplate>
                      <ItemStyle HorizontalAlign="Center" Width="10%" />
                  </asp:TemplateField>
              </Columns>
    </asp:GridView>
</asp:Panel>

    </div>
  </form>
</body>
</html>
